<?php
/**
* 访问控制基类
*/
namespace common\base\controller;

use Yii;

class Controller extends \yii\web\Controller
{
	public function init()
	{
		parent::init();
		//检测是否登陆
		if (Yii::$app->user->isGuest) {
			Yii::$app->user->loginRequired();
		}
	}

}